package org.bud.rung.bit;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author shaun
 * @date 2024/8/10
 * @instruction
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class R<T> {
    private String msg;
    private boolean success;
    private T data;
    public static R ok(){
        return R.builder().success(true).build();
    }
    public static <T> R ok(String msg,T data){
        return R.builder().success(true).msg(msg).data(data).build();
    }
    public static R jobEmpty(){
        return R.builder().success(false).msg("jobEmpty").build();
    }
}
